package com.ouyeel.wlxer.api;


import com.ouyeel.wlxer.bean.BaseRsponseOut;
import com.ouyeel.wlxer.bean.GoWrokIn;
import com.ouyeel.wlxer.bean.LoginOut;
import com.ouyeel.wlxer.bean.ManualOut;
import com.ouyeel.wlxer.bean.UploadqrcodeOut;
import com.ouyeel.wlxer.bean.VersionIn;
import com.ouyeel.wlxer.bean.VersionOut;

import io.reactivex.Observable;
import okhttp3.RequestBody;
import retrofit2.http.Body;
import retrofit2.http.POST;

/**
 * Created by rankaifeng on 2017/9/25.
 */

public interface WlxerApi {
    /**
     * 版本更新
     *
     * @param versionIn
     * @return
     */
    @POST("user/appversion")
    Observable<VersionOut> getAppVersion(@Body VersionIn versionIn);

    /**
     * 登陆
     *
     * @param body
     * @return
     */
    @POST("user/userlogin")
    Observable<LoginOut> login(@Body RequestBody body);

    /**
     * 上传二维码信息 打卡上班
     *
     * @param goWrokIn
     * @return
     */
    @POST("user/uploadqrcode")
    Observable<UploadqrcodeOut> uploadqrcode(@Body GoWrokIn goWrokIn);

    /**
     * 退出登陆
     *
     * @param body
     * @return
     */
    @POST("user/outlogin")
    Observable<BaseRsponseOut> outlogin(@Body RequestBody body);

    /**
     * 打卡下班
     *
     * @param goWrokIn
     * @return
     */
    @POST("user/clockOut")
    Observable<BaseRsponseOut> clockOut(@Body GoWrokIn goWrokIn);

    /**
     * 获取车牌号
     *
     * @param body
     * @return
     */
    @POST("user/getCarDrivers")
    Observable<ManualOut> getCarNumber(@Body RequestBody body);
}
